<?php

	error_reporting(E_ALL);

	include_once("sqlhelper.php");
	$cn = SqlHelper::OpenTransConn();

	$strTimeBackTo	= $cn->DBTimeStamp(strtotime("-38 hour",time()));
	
	switch (SqlHelper::$strDatabase)
	{
		case SqlHelper::$MSSQL :
			$strSql = "SELECT 	TOP 1 * FROM EARTHQUAKE WHERE dtdate <= $strTimeBackTo";
		break;
		
		case SqlHelper::$MYSQL :
			$strSql = "";
		break;
	}	
	
	if ($rs = $cn->Execute($strSql))
	{	
		while (!$rs->EOF)
		{
			$strTitle		= $rs->fields["STITLE"];
									
			print "$strTitle";
			
					
			$rs->MoveNext();
		}
	}
	else {
		echo "Cannot connect.";
	}
	$cn->Close();
?>


